<html>
<head>
  <title><%= @title %></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag *@action_specific_js if !@action_specific_js.nil?%>
  <%= stylesheet_link_tag 'style' %>
  <%= stylesheet_link_tag 'auto_complete' %>
</head>
<body>
<div class="content">
		<div class="header">
			<div class="top_info">
				<div class="top_info_right">
				<% unless session[:user] %>
					<p><b>您还没有登录！</b> 请<%= link_to "登录", :controller => "users", :action => "signin" %>以便你能够修改您的个人信息。<br />
					您也可以选择<%= link_to "登录", :controller => "users", :action => "signin" %>或者<%= link_to "注册", :controller => "users", :action => "signup" %></p>
			 <% else %>
			     <p>欢迎您, <%= User.find(session[:user]).username %>!<br/>
			     您可以选择<%= link_to "Log out", :controller => "users", :action => "signout" %>
			     或者<%= link_to "修改密码",  :controller => "users", :action => "change_password" %></p>
			 <% end %>
				</div>		
				<div class="top_info_left">
				</div>
			</div>
			<div class="logo">
				<h1><%= link_to Configuration.site_name, frontpage_url %></h1>
			</div>
		</div>
		
		<div class="bar">
			<ul>
				<%= main_menu_item("最热站", :controller => "sites", :action => "popular")%>
				<%= main_menu_item("人物志", :controller => "users", :action => "list")%>
				<%= main_menu_item("找朋友", :controller => "identities", :action => "search")%>
				<% if !session[:user].blank?%>
				<%= main_menu_item("我的网络ID", :controller => "identities")%>
				<%= main_menu_item("推广自己", :controller => "promotions")%>
				<%= main_menu_item("邀请朋友", :controller => "users", :action => "invite")%>
				<% end%>
			</ul>
		</div>
		<div class="notice"><%= flash[:notice] %></div>	
		<div class="main">
			<%= yield :layout %>
		</div>
		<div class="footer">
			<%= link_to '联系我们', :controller => 'home', :action => 'contactus'%>	| 
			<a href="http://del.icio.us/post?url=<%= Configuration.site_url %>">
			 <img src="http://images.del.icio.us/static/img/delicious.small.gif" alt="del.icio.us"> del.icio.us</a>
		</div>
</div>
</body>
</html>
